home *** CD-ROM | disk | FTP | other *** search
- #define STRSIZ 256
- #define INBUF_SIZE 8192
- #define OUTBUF_SIZE 32768
- #define DLE 144
- #define MAX_BITS 13
- #define INIT_BITS 9
- #define HSIZE 8192
- #define FIRST 257
- #define CLEAR 256
-
-
- extern FILE *Log_fp;
-
- byte *inbuf;
- byte *inptr;
-
- long packed; /* File's compressed size */
- long unpacked; /* File's unpacked size */
- int method; /* Packing method */
-
- int incnt; /* Number of bytes in input buffer */
- unsigned bitbuf;
- int bits_left;
- char zipeof; /* used as an error flag */
-
- int in_handle; /* Input file handle */
-
- byte *outbuf;
- byte *outptr;
-
- long outpos; /* current position in output buffer */
- long outcnt; /* number of bytes in output buffer */
-
- int out_handle;
-
- byte followers[CLEAR][64];
- byte Slen[CLEAR];
-
-
- int prefix[HSIZE +1];
- byte suffix[HSIZE +1];
- byte stack[HSIZE +1];
-
- int codesize;
- int maxcode;
- int free_ent;
- int maxcodemax;
- int offset;
-
- static unsigned mask_bits[] =
- {0, 0x0001, 0x0003, 0x0007, 0x000f,
- 0x001f, 0x003f, 0x007f, 0x00ff,
- 0x01ff, 0x03ff, 0x07ff, 0x0fff,
- 0x1fff, 0x3fff, 0x7fff, 0xffff
- };
-
- int L_table[] = {0, 0x7f, 0x3f, 0x1f, 0x0f};
- int D_shift[] = {0, 0x07, 0x06, 0x05, 0x04};
- int D_mask[] = {0, 0x01, 0x03, 0x07, 0x0f};
-
- int B_table[] = { 8, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
- 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7,
- 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
- 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